<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <script>
    var gaProperty = 'UA-2577926-1';
    // Disable tracking if the opt-out cookie exists.
    var disableStr = 'ga-disable-' + gaProperty;
    if (document.cookie.indexOf(disableStr + '=true') > -1) {
      window[disableStr] = true;
    }
    function gaOptout() {
      document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = true;
    }
    function gaOptoutRevoke() {
      document.cookie = disableStr + '=false; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
      window[disableStr] = false;
    }
    </script>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-2577926-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-2577926-1', { 'anonymize_ip': true });
    </script>
    <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css" />
    <script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"></script>
    <script src="https://unpkg.com/lz-string@1.4.4/libs/lz-string.min.js"></script>
    <script>
    window.addEventListener("load", function() {
      window.cookieconsent.initialise({
        'palette': {
          'popup': {
            'background': '#eaf7f7',
            'text': '#5c7291'
          },
          'button': {
            'background': '#56cbdb',
            'text': '#ffffff'
          }
        },
        'theme': 'edgeless',
        'type': 'opt-out',
        'onInitialise': function (status) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onStatusChange': function(status, chosenBefore) {
          if (!this.hasConsented()) {
            gaOptout()
          }
        },
        'onRevokeChoice': function() {
          gaOptoutRevoke()
        }
      })
    });
    </script>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="./resources/prism/prism-1.20.0.css" type="text/css">
    <link rel="stylesheet" href="./css/ol.css" type="text/css">
    <link rel="stylesheet" href="./resources/layout.css" type="text/css">
    <script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"></script>
    <script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,TextDecoder"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/3.18.3/minified.js"></script>
    
    <link rel="stylesheet" href="vector-labels.css">
    <title>Vector Labels</title>
  </head>
  <body>

    <header class="navbar navbar-expand-sm navbar-dark mb-3 py-0" role="navigation">
      <a class="navbar-brand" href="https://openlayers.org/"><img src="./resources/logo-70x70.png" alt="">&nbsp;OpenLayers</a>

      <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>

      <!-- menu items that get hidden below 768px width -->
      <nav class="collapse navbar-collapse" id="olmenu">
        <ul class="nav navbar-nav ml-auto">
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
            <div class="dropdown-menu dropdown-menu-right mb-3" aria-labelledby="docdropdown">
              <a class="dropdown-item" href="../doc/">Docs</a>
              <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="../doc/quickstart.html"><i class="fa fa-check fa-fw mr-2 fa-lg"></i>Quick Start</a>
                <a class="dropdown-item" href="../doc/faq.html"><i class="fa fa-question fa-fw mr-2 fa-lg"></i>FAQ</a>
                <a class="dropdown-item" href="../doc/tutorials/"><i class="fa fa-book fa-fw mr-2 fa-lg"></i>Tutorials</a>
                <a class="dropdown-item" href="/workshop/"><i class="fa fa-graduation-cap fa-fw mr-2 fa-lg"></i>Workshop</a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i class="fa fa-stack-overflow fa-fw mr-2"></i>Ask a Question</a>
            </div>
          </li>
          <li class="nav-item active"><a class="nav-link" href="../examples/">Examples</a></li>
          <li class="nav-item"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap mr-1"></i>API</a></li>
          <li class="nav-item dropdown">
            <a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
            <div class="dropdown-menu dropdown-menu-right mb-3" aria-labelledby="codedropdown">
              <a class="dropdown-item" href="https://github.com/openlayers/openlayers"><i class="fa fa-github fa-fw mr-2 fa-lg"></i>Repository</a>
              <a class="dropdown-item" href="/download/"><i class="fa fa-download fa-fw mr-2 fa-lg"></i>Download</a>
            </div>
           </li>
        </ul>
      </nav>
    </header>

    <div class="container-fluid line-numbers">

      <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
        <button id="latest-dismiss" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        This example uses OpenLayers v<span>6.13.0</span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
      </div>


      <div class="row-fluid">
        <a href="#" id="codepen-button" class="btn btn-link float-right">
          <i class="fa fa-codepen fa-lg"></i> Edit
        </a>
        <div class="span12">
          <h4 id="title">Vector Labels</h4>
          <p class="tags">
            <span class="badge-group">
              <a
                href="./index.html?q=geojson" class="badge badge-info">geojson</a
              ><a
                class="badge badge-info tag-modal-toggle text-white"
                data-toggle="modal"
                data-target="#tag-example-list"
                data-title="geojson"
                data-content="
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./drag-and-drop.html&quot;&gt;Drag-and-Drop&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./drag-and-drop-image-vector.html&quot;&gt;Drag-and-Drop Image Vector&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geojson.html&quot;&gt;GeoJSON&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geojson-vt.html&quot;&gt;geojson-vt integration&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./style-renderer.html&quot;&gt;Style renderer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./vector-labels.html&quot;&gt;Vector Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-layer.html&quot;&gt;Vector Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./hitdetect-vector.html&quot;&gt;Vector Layer Hit Detection&lt;/a&gt;"
                tabindex="0"
                >8</a>
            </span>
            <span class="badge-group">
              <a
                href="./index.html?q=vector" class="badge badge-info">vector</a
              ><a
                class="badge badge-info tag-modal-toggle text-white"
                data-toggle="modal"
                data-target="#tag-example-list"
                data-title="vector"
                data-content="
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./mapbox-vector-tiles-advanced.html&quot;&gt;Advanced Mapbox Vector Tiles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./animated-gif.html&quot;&gt;Animated GIF&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-esri.html&quot;&gt;ArcGIS REST Feature Service&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./cluster.html&quot;&gt;Clustered Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./feature-animation.html&quot;&gt;Custom Animation&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./custom-circle-render.html&quot;&gt;Custom Circle Render&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./custom-hit-detection-renderer.html&quot;&gt;Custom Hit Detection Render&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./custom-interactions.html&quot;&gt;Custom Interactions&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./polygon-styles.html&quot;&gt;Custom Polygon Styles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./drag-and-drop-image-vector.html&quot;&gt;Drag-and-Drop Image Vector&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./draw-and-modify-features.html&quot;&gt;Draw and Modify Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./draw-and-modify-geodesic.html&quot;&gt;Draw and Modify Geodesic Circles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./draw-features.html&quot;&gt;Draw Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./draw-shapes.html&quot;&gt;Draw Shapes&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./clusters-dynamic.html&quot;&gt;Dynamic clusters&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./earthquake-clusters.html&quot;&gt;Earthquake Clusters&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./heatmap-earthquakes.html&quot;&gt;Earthquakes Heatmap&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./kml-earthquakes.html&quot;&gt;Earthquakes in KML&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./earthquake-custom-symbol.html&quot;&gt;Earthquakes with custom symbols&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-esri-edit.html&quot;&gt;Editable ArcGIS REST Feature Service&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./flight-animation.html&quot;&gt;Flight Animation&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./fractal.html&quot;&gt;Fractal Rendering&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./draw-freehand.html&quot;&gt;Freehand Drawing&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geojson.html&quot;&gt;GeoJSON&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geojson-vt.html&quot;&gt;geojson-vt integration&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./icon-color.html&quot;&gt;Icon Colors&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./modify-icon.html&quot;&gt;Icon modification&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./icon-negative.html&quot;&gt;Icon Pixel Operations&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./icon-scale.html&quot;&gt;Icon Scale&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./icon.html&quot;&gt;Icon Symbolizer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./jsts.html&quot;&gt;JSTS Integration&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./line-arrows.html&quot;&gt;LineString Arrows&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./mapbox-vector-layer.html&quot;&gt;Mapbox Vector Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./mapbox-vector-tiles.html&quot;&gt;Mapbox Vector Tiles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./mapbox-layer.html&quot;&gt;Mapbox-gl Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./measure.html&quot;&gt;Measure&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./measure-style.html&quot;&gt;Measure using vector styles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./modify-features.html&quot;&gt;Modify Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./modify-test.html&quot;&gt;Modify Features Test&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./ogc-vector-tiles.html&quot;&gt;OGC Vector Tiles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./osm-vector-tiles.html&quot;&gt;OSM Vector Tiles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-osm.html&quot;&gt;OSM XML&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./regularshape.html&quot;&gt;Regular Shapes&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./rich-text-labels.html&quot;&gt;Rich Text Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./modify-scale-and-rotate.html&quot;&gt;Scale and Rotate using Modify Interaction&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./select-features.html&quot;&gt;Select Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./select-hover-features.html&quot;&gt;Select Features by Hover&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./select-multiple-features.html&quot;&gt;Select multiple Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./snap.html&quot;&gt;Snap Interaction&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./street-labels.html&quot;&gt;Street Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./style-renderer.html&quot;&gt;Style renderer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./synthetic-lines.html&quot;&gt;Synthetic Lines&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./synthetic-points.html&quot;&gt;Synthetic Points&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./kml-timezones.html&quot;&gt;Timezones in KML&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./topojson.html&quot;&gt;TopoJSON&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./topolis.html&quot;&gt;topolis integration&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./tracing.html&quot;&gt;Tracing around a polygon&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./translate-features.html&quot;&gt;Translate Features&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./turf.html&quot;&gt;turf.js&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./layer-clipping-vector.html&quot;&gt;Vector Clipping Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./image-vector-layer.html&quot;&gt;Vector Image Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-label-decluttering.html&quot;&gt;Vector Label Decluttering&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./vector-labels.html&quot;&gt;Vector Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-layer.html&quot;&gt;Vector Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./hitdetect-vector.html&quot;&gt;Vector Layer Hit Detection&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-wfs.html&quot;&gt;WFS&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-wfs-getfeature.html&quot;&gt;WFS - GetFeature&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./vector-wfs-geographic.html&quot;&gt;WFS with geographic coordinates&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./wind-arrows.html&quot;&gt;Wind Arrows&lt;/a&gt;"
                tabindex="0"
                >69</a>
            </span>
            <span class="badge-group">
              <a
                href="./index.html?q=openstreetmap" class="badge badge-info">openstreetmap</a
              ><a
                class="badge badge-info tag-modal-toggle text-white"
                data-toggle="modal"
                data-target="#tag-example-list"
                data-title="openstreetmap"
                data-content="
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./center.html&quot;&gt;Advanced View Positioning&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./attributions.html&quot;&gt;Attributions&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./canvas-tiles.html&quot;&gt;Canvas Tiles&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./cartodb.html&quot;&gt;CartoDB source example&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./export-pdf.html&quot;&gt;Export PDF example&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geojson.html&quot;&gt;GeoJSON&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./geolocation.html&quot;&gt;Geolocation&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./layer-clipping.html&quot;&gt;Layer Clipping&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./layer-swipe.html&quot;&gt;Layer Swipe&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./localized-openstreetmap.html&quot;&gt;Localized OpenStreetMap&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./export-map.html&quot;&gt;Map Export&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./mouse-position.html&quot;&gt;Mouse Position&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./reprojection-wgs84.html&quot;&gt;OpenStreetMap Reprojection&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./scaleline-indiana-east.html&quot;&gt;OpenStreetMap Reprojection with ScaleLine Control&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./permalink.html&quot;&gt;Permalink&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./scale-line.html&quot;&gt;Scale Line&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./simple.html&quot;&gt;Simple Map&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./teleport.html&quot;&gt;Teleporting Maps&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./layer-clipping-vector.html&quot;&gt;Vector Clipping Layer&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./vector-labels.html&quot;&gt;Vector Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./rotation.html&quot;&gt;View Rotation&lt;/a&gt;"
                tabindex="0"
                >21</a>
            </span>
            <span class="badge-group">
              <a
                href="./index.html?q=label" class="badge badge-info">label</a
              ><a
                class="badge badge-info tag-modal-toggle text-white"
                data-toggle="modal"
                data-target="#tag-example-list"
                data-title="label"
                data-content="
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./icon-scale.html&quot;&gt;Icon Scale&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action&quot; href=&quot;./street-labels.html&quot;&gt;Street Labels&lt;/a&gt;
                  &lt;a class=&quot;list-group-item list-group-item-action active&quot; href=&quot;./vector-labels.html&quot;&gt;Vector Labels&lt;/a&gt;"
                tabindex="0"
                >3</a>
            </span>
          </p>
          <div class="modal modal-tag-example" id="tag-example-list" tabindex="-1" role="dialog" aria-labelledby="tag-example-title" aria-hidden="true">
            <div class="modal-dialog modal-dialog-scrollable" role="document">
              <div class="modal-content">
                <div class="modal-header">
                  <h5 class="modal-title" id="tag-example-title"></h5>
                  <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                  </button>
                </div>
                <div class="modal-body">
                  <div class="list-group"></div>
                </div>
              </div>
            </div>
          </div>
          <div id="map" class="map"></div>

<div class="edit-form">
  <input id="refresh-points" type="button" value="Refresh" />
  <h2>Points</h2>
  <div class="edit-form-elem">
    <label for="points-text">Text: </label>
    <select id="points-text">
      <option value="hide">Hide</option>
      <option value="normal">Normal</option>
      <option value="shorten" selected="selected">Shorten</option>
      <option value="wrap">Wrap</option>
    </select>
    <br />
    <label for="points-maxreso" title="Max Resolution Denominator">MaxReso.: </label>
    <select id="points-maxreso">
      <option value="38400">38,400</option>
      <option value="19200">19,200</option>
      <option value="9600">9,600</option>
      <option value="4800">4,800</option>
      <option value="2400">2,400</option>
      <option value="1200" selected="selected">1,200</option>
      <option value="600">600</option>
      <option value="300">300</option>
      <option value="150">150</option>
      <option value="75">75</option>
      <option value="32">32</option>
      <option value="16">16</option>
      <option value="8">8</option>
    </select>
    <br />
    <label for="points-align">Align: </label>
    <select id="points-align">
      <option value="center" selected="selected">Center</option>
      <option value="end">End</option>
      <option value="left">Left</option>
      <option value="right">Right</option>
      <option value="start">Start</option>
    </select>
    <br />
    <label for="points-baseline">Baseline: </label>
    <select id="points-baseline">
      <option value="alphabetic">Alphabetic</option>
      <option value="bottom">Bottom</option>
      <option value="hanging">Hanging</option>
      <option value="ideographic">Ideographic</option>
      <option value="middle" selected="selected">Middle</option>
      <option value="top">Top</option>
    </select>
    <br />
    <label for="points-rotation">Rotation: </label>
    <select id="points-rotation">
      <option value="0">0°</option>
      <option value="0.785398164">45°</option>
      <option value="1.570796327">90°</option>
    </select>
    <br />
    <label for="points-font">Font: </label>
    <select id="points-font">
      <option value="Arial" selected="selected">Arial</option>
      <option value="'Courier New'">Courier New</option>
      <option value="'Open Sans'">Open Sans</option>
      <option value="Verdana">Verdana</option>
    </select>
    <br />
    <label for="points-weight">Weight: </label>
    <select id="points-weight">
      <option value="bold">Bold</option>
      <option value="normal" selected="selected">Normal</option>
    </select>
    <br />
    <label for="points-placement">Placement: </label>
    <select disabled id="points-placement">
      <option value="line">Line</option>
      <option value="point" selected="selected">Point</option>
    </select>
    <br />
    <label for="points-maxangle">Max Angle: </label>
    <select disabled id="points-maxangle">
      <option value="0.7853981633974483" selected="selected">45°</option>
      <option value="2.0943951023931953">120°</option>
      <option value="6.283185307179586">360°</option>
    </select>
    <br />
    <label for="points-overflow">Exceed Len: </label>
    <select disabled id="points-overflow">
      <option value="true">True</option>
      <option value="false" selected="selected">False</option>
    </select>
    <br />
    <label for="points-size">Size: </label>
    <input type="text" value="12px" id="points-size" />
    <br />
    <label for="points-height">Line height: </label>
    <input type="text" value="1" id="points-height" />
    <br />
    <label for="points-offset-x">Offset X: </label>
    <input type="text" value="0" id="points-offset-x" />
    <br />
    <label for="points-offset-y">Offset Y: </label>
    <input type="text" value="0" id="points-offset-y" />
    <br />
    <label for="points-color">Color: </label>
    <input type="text" value="#aa3300" id="points-color" />
    <br />
    <label for="points-outline" title="Outline Color">O. Color: </label>
    <input type="text" value="#ffffff" id="points-outline" />
    <br />
    <label for="points-outline-width" title="Outline Width">O. Width: </label>
    <input type="text" value="3" id="points-outline-width" />
  </div>
</div>

<div class="edit-form">
  <input id="refresh-lines" type="button" value="Refresh" />
  <h2>Lines</h2>
  <div class="edit-form-elem">
    <label for="lines-text">Text: </label>
    <select id="lines-text">
      <option value="hide">Hide</option>
      <option value="normal">Normal</option>
      <option value="shorten">Shorten</option>
      <option value="wrap" selected="selected">Wrap</option>
    </select>
    <br />
    <label for="lines-maxreso" title="Max Resolution Denominator">MaxReso.: </label>
    <select id="lines-maxreso">
      <option value="38400">38,400</option>
      <option value="19200">19,200</option>
      <option value="9600">9,600</option>
      <option value="4800">4,800</option>
      <option value="2400">2,400</option>
      <option value="1200" selected="selected">1,200</option>
      <option value="600">600</option>
      <option value="300">300</option>
      <option value="150">150</option>
      <option value="75">75</option>
      <option value="32">32</option>
      <option value="16">16</option>
      <option value="8">8</option>
    </select>
    <br />
    <label for="lines-align">Align: </label>
    <select id="lines-align">
      <option value="" selected="selected"></option>
      <option value="center">Center</option>
      <option value="end">End</option>
      <option value="left">Left</option>
      <option value="right">Right</option>
      <option value="start">Start</option>
    </select>
    <br />
    <label for="lines-baseline">Baseline: </label>
    <select id="lines-baseline">
      <option value="alphabetic">Alphabetic</option>
      <option value="bottom">Bottom</option>
      <option value="hanging">Hanging</option>
      <option value="ideographic">Ideographic</option>
      <option value="middle" selected="selected">Middle</option>
      <option value="top">Top</option>
    </select>
    <br />
    <label for="lines-rotation">Rotation: </label>
    <select id="lines-rotation">
      <option value="0">0°</option>
      <option value="0.785398164">45°</option>
      <option value="1.570796327">90°</option>
    </select>
    <br />
    <label for="lines-font">Font: </label>
    <select id="lines-font">
      <option value="Arial">Arial</option>
      <option value="'Courier New'" selected="selected">Courier New</option>
      <option value="'Open Sans'">Open Sans</option>
      <option value="Verdana">Verdana</option>
    </select>
    <br />
    <label for="lines-weight">Weight: </label>
    <select id="lines-weight">
      <option value="bold" selected="selected">Bold</option>
      <option value="normal">Normal</option>
    </select>
    <br />
    <label for="lines-placement">Placement: </label>
    <select id="lines-placement">
      <option value="line">Line</option>
      <option value="point" selected="selected">Point</option>
    </select>
    <br />
    <label for="lines-maxangle">Max Angle: </label>
    <select id="lines-maxangle">
      <option value="0.7853981633974483" selected="selected">45°</option>
      <option value="2.0943951023931953">120°</option>
      <option value="6.283185307179586">360°</option>
    </select>
    <br />
    <label for="lines-overflow">Exceed Len: </label>
    <select id="lines-overflow">
      <option value="true">True</option>
      <option value="false" selected="selected">False</option>
    </select>
    <br />
    <label for="lines-size">Size: </label>
    <input type="text" value="12px" id="lines-size" />
    <br />
    <label for="lines-height">Line height: </label>
    <input type="text" value="1.2" id="lines-height" />
    <br />
    <label for="lines-offset-x">Offset X: </label>
    <input type="text" value="0" id="lines-offset-x" />
    <br />
    <label for="lines-offset-y">Offset Y: </label>
    <input type="text" value="0" id="lines-offset-y" />
    <br />
    <label for="lines-color">Color: </label>
    <input type="text" value="green" id="lines-color" />
    <br />
    <label for="lines-outline" title="Outline Color">O. Color: </label>
    <input type="text" value="#ffffff" id="lines-outline" />
    <br />
    <label for="lines-outline-width" title="Outline Width">O. Width: </label>
    <input type="text" value="3" id="lines-outline-width" />
  </div>
</div>

<div class="edit-form">
  <input id="refresh-polygons" type="button" value="Refresh" />
  <h2>Polygons</h2>
  <div class="edit-form-elem">
    <label for="polygons-text">Text: </label>
    <select id="polygons-text">
      <option value="hide">Hide</option>
      <option value="normal" selected="selected">Normal</option>
      <option value="shorten">Shorten</option>
      <option value="wrap">Wrap</option>
    </select>
    <br />
    <label for="polygons-maxreso" title="Max Resolution Denominator">MaxReso.: </label>
    <select id="polygons-maxreso">
      <option value="38400">38,400</option>
      <option value="19200">19,200</option>
      <option value="9600">9,600</option>
      <option value="4800">4,800</option>
      <option value="2400">2,400</option>
      <option value="1200" selected="selected">1,200</option>
      <option value="600">600</option>
      <option value="300">300</option>
      <option value="150">150</option>
      <option value="75">75</option>
      <option value="32">32</option>
      <option value="16">16</option>
      <option value="8">8</option>
    </select>
    <br />
    <label for="polygons-align">Align: </label>
    <select id="polygons-align">
      <option value="" selected="selected"></option>
      <option value="center">Center</option>
      <option value="end">End</option>
      <option value="left">Left</option>
      <option value="right">Right</option>
      <option value="start">Start</option>
    </select>
    <br />
    <label for="polygons-baseline">Baseline: </label>
    <select id="polygons-baseline">
      <option value="alphabetic">Alphabetic</option>
      <option value="bottom">Bottom</option>
      <option value="hanging">Hanging</option>
      <option value="ideographic">Ideographic</option>
      <option value="middle" selected="selected">Middle</option>
      <option value="top">Top</option>
    </select>
    <br />
    <label for="polygons-rotation">Rotation: </label>
    <select id="polygons-rotation">
      <option value="0">0°</option>
      <option value="0.785398164">45°</option>
      <option value="1.570796327">90°</option>
    </select>
    <br />
    <label for="polygons-font">Font: </label>
    <select id="polygons-font">
      <option value="Arial">Arial</option>
      <option value="'Courier New'">Courier New</option>
      <option value="'Open Sans'">Open Sans</option>
      <option value="Verdana" selected="selected">Verdana</option>
    </select>
    <br />
    <label for="polygons-weight">Weight: </label>
    <select id="polygons-weight">
      <option value="bold" selected="selected">Bold</option>
      <option value="normal">Normal</option>
    </select>
    <br />
    <label for="polygons-placement">Placement: </label>
    <select id="polygons-placement">
      <option value="line">Line</option>
      <option value="point" selected="selected">Point</option>
    </select>
    <br />
    <label for="polygons-maxangle">Max Angle: </label>
    <select id="polygons-maxangle">
      <option value="0.7853981633974483" selected="selected">45°</option>
      <option value="2.0943951023931953">120°</option>
      <option value="6.283185307179586">360°</option>
    </select>
    <br />
    <label for="polygons-overflow">Exceed Len: </label>
    <select id="polygons-overflow">
      <option value="true">True</option>
      <option value="false" selected="selected">False</option>
    </select>
    <br />
    <label for="polygons-size">Size: </label>
    <input type="text" value="10px" id="polygons-size" />
    <br />
    <label for="polygons-height">Line height: </label>
    <input type="text" value="1" id="polygons-height" />
    <br />
    <label for="polygons-offset-x">Offset X: </label>
    <input type="text" value="0" id="polygons-offset-x" />
    <br />
    <label for="polygons-offset-y">Offset Y: </label>
    <input type="text" value="0" id="polygons-offset-y" />
    <br />
    <label for="polygons-color">Color: </label>
    <input type="text" value="blue" id="polygons-color" />
    <br />
    <label for="polygons-outline" title="Outline Color">O. Color: </label>
    <input type="text" value="#ffffff" id="polygons-outline" />
    <br />
    <label for="polygons-outline-width" title="Outline Width">O. Width: </label>
    <input type="text" value="3" id="polygons-outline-width" />
  </div>
</div>

        </div>
        <form method="POST" id="codepen-form" target="_blank" action="https://codesandbox.io/api/v1/sandboxes/define">
          <input id="codesandbox-params" type="hidden" name="parameters">
        </form>
      </div>

      <div class="row-fluid">
        <div class="span12">
          <p id="shortdesc">Example of GeoJSON features with labels.</p>
          <div id="docs"><p>This example showcases a number of options that can be set on text styles. When &quot;Text/Wrap&quot; is chosen (for example for the line features), the label is wrapped by inserting the character <code>\n</code>, which will create a multi-line label. The &quot;Open Sans&quot; web font will be loaded on demand, to show dynamic font loading.</p>
</div>
        </div>
      </div>

      <div class="row-fluid">
        <h5 class="source-heading">main.js</h5>
        <pre><code id="example-js-source" class="language-js">import 'ol/ol.css';
import GeoJSON from &#x27;ol/format/GeoJSON&#x27;;
import Map from &#x27;ol/Map&#x27;;
import View from &#x27;ol/View&#x27;;
import {
  Circle as CircleStyle,
  Fill,
  Stroke,
  Style,
  Text,
} from &#x27;ol/style&#x27;;
import {OSM, Vector as VectorSource} from &#x27;ol/source&#x27;;
import {Tile as TileLayer, Vector as VectorLayer} from &#x27;ol/layer&#x27;;

let openSansAdded &#x3D; false;

const myDom &#x3D; {
  points: {
    text: document.getElementById(&#x27;points-text&#x27;),
    align: document.getElementById(&#x27;points-align&#x27;),
    baseline: document.getElementById(&#x27;points-baseline&#x27;),
    rotation: document.getElementById(&#x27;points-rotation&#x27;),
    font: document.getElementById(&#x27;points-font&#x27;),
    weight: document.getElementById(&#x27;points-weight&#x27;),
    size: document.getElementById(&#x27;points-size&#x27;),
    height: document.getElementById(&#x27;points-height&#x27;),
    offsetX: document.getElementById(&#x27;points-offset-x&#x27;),
    offsetY: document.getElementById(&#x27;points-offset-y&#x27;),
    color: document.getElementById(&#x27;points-color&#x27;),
    outline: document.getElementById(&#x27;points-outline&#x27;),
    outlineWidth: document.getElementById(&#x27;points-outline-width&#x27;),
    maxreso: document.getElementById(&#x27;points-maxreso&#x27;),
  },
  lines: {
    text: document.getElementById(&#x27;lines-text&#x27;),
    align: document.getElementById(&#x27;lines-align&#x27;),
    baseline: document.getElementById(&#x27;lines-baseline&#x27;),
    rotation: document.getElementById(&#x27;lines-rotation&#x27;),
    font: document.getElementById(&#x27;lines-font&#x27;),
    weight: document.getElementById(&#x27;lines-weight&#x27;),
    placement: document.getElementById(&#x27;lines-placement&#x27;),
    maxangle: document.getElementById(&#x27;lines-maxangle&#x27;),
    overflow: document.getElementById(&#x27;lines-overflow&#x27;),
    size: document.getElementById(&#x27;lines-size&#x27;),
    height: document.getElementById(&#x27;lines-height&#x27;),
    offsetX: document.getElementById(&#x27;lines-offset-x&#x27;),
    offsetY: document.getElementById(&#x27;lines-offset-y&#x27;),
    color: document.getElementById(&#x27;lines-color&#x27;),
    outline: document.getElementById(&#x27;lines-outline&#x27;),
    outlineWidth: document.getElementById(&#x27;lines-outline-width&#x27;),
    maxreso: document.getElementById(&#x27;lines-maxreso&#x27;),
  },
  polygons: {
    text: document.getElementById(&#x27;polygons-text&#x27;),
    align: document.getElementById(&#x27;polygons-align&#x27;),
    baseline: document.getElementById(&#x27;polygons-baseline&#x27;),
    rotation: document.getElementById(&#x27;polygons-rotation&#x27;),
    font: document.getElementById(&#x27;polygons-font&#x27;),
    weight: document.getElementById(&#x27;polygons-weight&#x27;),
    placement: document.getElementById(&#x27;polygons-placement&#x27;),
    maxangle: document.getElementById(&#x27;polygons-maxangle&#x27;),
    overflow: document.getElementById(&#x27;polygons-overflow&#x27;),
    size: document.getElementById(&#x27;polygons-size&#x27;),
    height: document.getElementById(&#x27;polygons-height&#x27;),
    offsetX: document.getElementById(&#x27;polygons-offset-x&#x27;),
    offsetY: document.getElementById(&#x27;polygons-offset-y&#x27;),
    color: document.getElementById(&#x27;polygons-color&#x27;),
    outline: document.getElementById(&#x27;polygons-outline&#x27;),
    outlineWidth: document.getElementById(&#x27;polygons-outline-width&#x27;),
    maxreso: document.getElementById(&#x27;polygons-maxreso&#x27;),
  },
};

const getText &#x3D; function (feature, resolution, dom) {
  const type &#x3D; dom.text.value;
  const maxResolution &#x3D; dom.maxreso.value;
  let text &#x3D; feature.get(&#x27;name&#x27;);

  if (resolution &gt; maxResolution) {
    text &#x3D; &#x27;&#x27;;
  } else if (type &#x3D;&#x3D; &#x27;hide&#x27;) {
    text &#x3D; &#x27;&#x27;;
  } else if (type &#x3D;&#x3D; &#x27;shorten&#x27;) {
    text &#x3D; text.trunc(12);
  } else if (
    type &#x3D;&#x3D; &#x27;wrap&#x27; &amp;&amp;
    (!dom.placement || dom.placement.value !&#x3D; &#x27;line&#x27;)
  ) {
    text &#x3D; stringDivider(text, 16, &#x27;\n&#x27;);
  }

  return text;
};

const createTextStyle &#x3D; function (feature, resolution, dom) {
  const align &#x3D; dom.align.value;
  const baseline &#x3D; dom.baseline.value;
  const size &#x3D; dom.size.value;
  const height &#x3D; dom.height.value;
  const offsetX &#x3D; parseInt(dom.offsetX.value, 10);
  const offsetY &#x3D; parseInt(dom.offsetY.value, 10);
  const weight &#x3D; dom.weight.value;
  const placement &#x3D; dom.placement ? dom.placement.value : undefined;
  const maxAngle &#x3D; dom.maxangle ? parseFloat(dom.maxangle.value) : undefined;
  const overflow &#x3D; dom.overflow ? dom.overflow.value &#x3D;&#x3D; &#x27;true&#x27; : undefined;
  const rotation &#x3D; parseFloat(dom.rotation.value);
  if (dom.font.value &#x3D;&#x3D; &quot;&#x27;Open Sans&#x27;&quot; &amp;&amp; !openSansAdded) {
    const openSans &#x3D; document.createElement(&#x27;link&#x27;);
    openSans.href &#x3D; &#x27;https://fonts.googleapis.com/css?family&#x3D;Open+Sans&#x27;;
    openSans.rel &#x3D; &#x27;stylesheet&#x27;;
    document.getElementsByTagName(&#x27;head&#x27;)[0].appendChild(openSans);
    openSansAdded &#x3D; true;
  }
  const font &#x3D; weight + &#x27; &#x27; + size + &#x27;/&#x27; + height + &#x27; &#x27; + dom.font.value;
  const fillColor &#x3D; dom.color.value;
  const outlineColor &#x3D; dom.outline.value;
  const outlineWidth &#x3D; parseInt(dom.outlineWidth.value, 10);

  return new Text({
    textAlign: align &#x3D;&#x3D; &#x27;&#x27; ? undefined : align,
    textBaseline: baseline,
    font: font,
    text: getText(feature, resolution, dom),
    fill: new Fill({color: fillColor}),
    stroke: new Stroke({color: outlineColor, width: outlineWidth}),
    offsetX: offsetX,
    offsetY: offsetY,
    placement: placement,
    maxAngle: maxAngle,
    overflow: overflow,
    rotation: rotation,
  });
};

// Polygons
function polygonStyleFunction(feature, resolution) {
  return new Style({
    stroke: new Stroke({
      color: &#x27;blue&#x27;,
      width: 1,
    }),
    fill: new Fill({
      color: &#x27;rgba(0, 0, 255, 0.1)&#x27;,
    }),
    text: createTextStyle(feature, resolution, myDom.polygons),
  });
}

const vectorPolygons &#x3D; new VectorLayer({
  source: new VectorSource({
    url: &#x27;data/geojson/polygon-samples.geojson&#x27;,
    format: new GeoJSON(),
  }),
  style: polygonStyleFunction,
});

// Lines
function lineStyleFunction(feature, resolution) {
  return new Style({
    stroke: new Stroke({
      color: &#x27;green&#x27;,
      width: 2,
    }),
    text: createTextStyle(feature, resolution, myDom.lines),
  });
}

const vectorLines &#x3D; new VectorLayer({
  source: new VectorSource({
    url: &#x27;data/geojson/line-samples.geojson&#x27;,
    format: new GeoJSON(),
  }),
  style: lineStyleFunction,
});

// Points
function pointStyleFunction(feature, resolution) {
  return new Style({
    image: new CircleStyle({
      radius: 10,
      fill: new Fill({color: &#x27;rgba(255, 0, 0, 0.1)&#x27;}),
      stroke: new Stroke({color: &#x27;red&#x27;, width: 1}),
    }),
    text: createTextStyle(feature, resolution, myDom.points),
  });
}

const vectorPoints &#x3D; new VectorLayer({
  source: new VectorSource({
    url: &#x27;data/geojson/point-samples.geojson&#x27;,
    format: new GeoJSON(),
  }),
  style: pointStyleFunction,
});

const map &#x3D; new Map({
  layers: [
    new TileLayer({
      source: new OSM(),
    }),
    vectorPolygons,
    vectorLines,
    vectorPoints,
  ],
  target: &#x27;map&#x27;,
  view: new View({
    center: [-8161939, 6095025],
    zoom: 8,
  }),
});

document
  .getElementById(&#x27;refresh-points&#x27;)
  .addEventListener(&#x27;click&#x27;, function () {
    vectorPoints.setStyle(pointStyleFunction);
  });

document.getElementById(&#x27;refresh-lines&#x27;).addEventListener(&#x27;click&#x27;, function () {
  vectorLines.setStyle(lineStyleFunction);
});

document
  .getElementById(&#x27;refresh-polygons&#x27;)
  .addEventListener(&#x27;click&#x27;, function () {
    vectorPolygons.setStyle(polygonStyleFunction);
  });

/**
 * @param {number} n The max number of characters to keep.
 * @return {string} Truncated string.
 */
String.prototype.trunc &#x3D;
  String.prototype.trunc ||
  function (n) {
    return this.length &gt; n ? this.substr(0, n - 1) + &#x27;...&#x27; : this.substr(0);
  };

// https://stackoverflow.com/questions/14484787/wrap-text-in-javascript
function stringDivider(str, width, spaceReplacer) {
  if (str.length &gt; width) {
    let p &#x3D; width;
    while (p &gt; 0 &amp;&amp; str[p] !&#x3D; &#x27; &#x27; &amp;&amp; str[p] !&#x3D; &#x27;-&#x27;) {
      p--;
    }
    if (p &gt; 0) {
      let left;
      if (str.substring(p, p + 1) &#x3D;&#x3D; &#x27;-&#x27;) {
        left &#x3D; str.substring(0, p + 1);
      } else {
        left &#x3D; str.substring(0, p);
      }
      const right &#x3D; str.substring(p + 1);
      return left + spaceReplacer + stringDivider(right, width, spaceReplacer);
    }
  }
  return str;
}
</code></pre>
      </div>

      <div class="row-fluid">
        <h5 class="source-heading">index.html</h5>
        <pre><code id="example-html-source" class="language-markup">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Vector Labels&lt;/title&gt;
    &lt;!-- Pointer events polyfill for old browsers, see https://caniuse.com/#feat=pointer --&gt;
    &lt;script src="https://unpkg.com/elm-pep@1.0.6/dist/elm-pep.js"&gt;&lt;/script&gt;
    &lt;!-- The lines below are only needed for old environments like Internet Explorer and Android 4.x --&gt;
    &lt;script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,TextDecoder"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/3.18.3/minified.js"&gt;&lt;/script&gt;
    &lt;style&gt;
      .map {
        width: 100%;
        height:400px;
      }
      .edit-form {
        display: inline-block;
        margin: 5px;
        padding: 10px;
        border: 1px solid black;
        white-space: nowrap;
      }

      .edit-form h2 {
        font-size: 1.5em;
      }

      .edit-form input[type&#x3D;&quot;button&quot;] {
        float: right;
      }

      .edit-form-elem label {
        display: inline-block;
        width: 85px;
      }

      .edit-form-elem input[type&#x3D;&quot;text&quot;],
      .edit-form-elem select {
        width: 130px;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id&#x3D;&quot;map&quot; class&#x3D;&quot;map&quot;&gt;&lt;/div&gt;

    &lt;div class&#x3D;&quot;edit-form&quot;&gt;
      &lt;input id&#x3D;&quot;refresh-points&quot; type&#x3D;&quot;button&quot; value&#x3D;&quot;Refresh&quot; /&gt;
      &lt;h2&gt;Points&lt;/h2&gt;
      &lt;div class&#x3D;&quot;edit-form-elem&quot;&gt;
        &lt;label for&#x3D;&quot;points-text&quot;&gt;Text: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-text&quot;&gt;
          &lt;option value&#x3D;&quot;hide&quot;&gt;Hide&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot;&gt;Normal&lt;/option&gt;
          &lt;option value&#x3D;&quot;shorten&quot; selected&#x3D;&quot;selected&quot;&gt;Shorten&lt;/option&gt;
          &lt;option value&#x3D;&quot;wrap&quot;&gt;Wrap&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-maxreso&quot; title&#x3D;&quot;Max Resolution Denominator&quot;&gt;MaxReso.: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-maxreso&quot;&gt;
          &lt;option value&#x3D;&quot;38400&quot;&gt;38,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;19200&quot;&gt;19,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;9600&quot;&gt;9,600&lt;/option&gt;
          &lt;option value&#x3D;&quot;4800&quot;&gt;4,800&lt;/option&gt;
          &lt;option value&#x3D;&quot;2400&quot;&gt;2,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;1200&quot; selected&#x3D;&quot;selected&quot;&gt;1,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;600&quot;&gt;600&lt;/option&gt;
          &lt;option value&#x3D;&quot;300&quot;&gt;300&lt;/option&gt;
          &lt;option value&#x3D;&quot;150&quot;&gt;150&lt;/option&gt;
          &lt;option value&#x3D;&quot;75&quot;&gt;75&lt;/option&gt;
          &lt;option value&#x3D;&quot;32&quot;&gt;32&lt;/option&gt;
          &lt;option value&#x3D;&quot;16&quot;&gt;16&lt;/option&gt;
          &lt;option value&#x3D;&quot;8&quot;&gt;8&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-align&quot;&gt;Align: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-align&quot;&gt;
          &lt;option value&#x3D;&quot;center&quot; selected&#x3D;&quot;selected&quot;&gt;Center&lt;/option&gt;
          &lt;option value&#x3D;&quot;end&quot;&gt;End&lt;/option&gt;
          &lt;option value&#x3D;&quot;left&quot;&gt;Left&lt;/option&gt;
          &lt;option value&#x3D;&quot;right&quot;&gt;Right&lt;/option&gt;
          &lt;option value&#x3D;&quot;start&quot;&gt;Start&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-baseline&quot;&gt;Baseline: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-baseline&quot;&gt;
          &lt;option value&#x3D;&quot;alphabetic&quot;&gt;Alphabetic&lt;/option&gt;
          &lt;option value&#x3D;&quot;bottom&quot;&gt;Bottom&lt;/option&gt;
          &lt;option value&#x3D;&quot;hanging&quot;&gt;Hanging&lt;/option&gt;
          &lt;option value&#x3D;&quot;ideographic&quot;&gt;Ideographic&lt;/option&gt;
          &lt;option value&#x3D;&quot;middle&quot; selected&#x3D;&quot;selected&quot;&gt;Middle&lt;/option&gt;
          &lt;option value&#x3D;&quot;top&quot;&gt;Top&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-rotation&quot;&gt;Rotation: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-rotation&quot;&gt;
          &lt;option value&#x3D;&quot;0&quot;&gt;0°&lt;/option&gt;
          &lt;option value&#x3D;&quot;0.785398164&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;1.570796327&quot;&gt;90°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-font&quot;&gt;Font: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-font&quot;&gt;
          &lt;option value&#x3D;&quot;Arial&quot; selected&#x3D;&quot;selected&quot;&gt;Arial&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Courier New&#x27;&quot;&gt;Courier New&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Open Sans&#x27;&quot;&gt;Open Sans&lt;/option&gt;
          &lt;option value&#x3D;&quot;Verdana&quot;&gt;Verdana&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-weight&quot;&gt;Weight: &lt;/label&gt;
        &lt;select id&#x3D;&quot;points-weight&quot;&gt;
          &lt;option value&#x3D;&quot;bold&quot;&gt;Bold&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot; selected&#x3D;&quot;selected&quot;&gt;Normal&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-placement&quot;&gt;Placement: &lt;/label&gt;
        &lt;select disabled id&#x3D;&quot;points-placement&quot;&gt;
          &lt;option value&#x3D;&quot;line&quot;&gt;Line&lt;/option&gt;
          &lt;option value&#x3D;&quot;point&quot; selected&#x3D;&quot;selected&quot;&gt;Point&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-maxangle&quot;&gt;Max Angle: &lt;/label&gt;
        &lt;select disabled id&#x3D;&quot;points-maxangle&quot;&gt;
          &lt;option value&#x3D;&quot;0.7853981633974483&quot; selected&#x3D;&quot;selected&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;2.0943951023931953&quot;&gt;120°&lt;/option&gt;
          &lt;option value&#x3D;&quot;6.283185307179586&quot;&gt;360°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-overflow&quot;&gt;Exceed Len: &lt;/label&gt;
        &lt;select disabled id&#x3D;&quot;points-overflow&quot;&gt;
          &lt;option value&#x3D;&quot;true&quot;&gt;True&lt;/option&gt;
          &lt;option value&#x3D;&quot;false&quot; selected&#x3D;&quot;selected&quot;&gt;False&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-size&quot;&gt;Size: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;12px&quot; id&#x3D;&quot;points-size&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-height&quot;&gt;Line height: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;1&quot; id&#x3D;&quot;points-height&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-offset-x&quot;&gt;Offset X: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;points-offset-x&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-offset-y&quot;&gt;Offset Y: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;points-offset-y&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-color&quot;&gt;Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;#aa3300&quot; id&#x3D;&quot;points-color&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-outline&quot; title&#x3D;&quot;Outline Color&quot;&gt;O. Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;#ffffff&quot; id&#x3D;&quot;points-outline&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;points-outline-width&quot; title&#x3D;&quot;Outline Width&quot;&gt;O. Width: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;3&quot; id&#x3D;&quot;points-outline-width&quot; /&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class&#x3D;&quot;edit-form&quot;&gt;
      &lt;input id&#x3D;&quot;refresh-lines&quot; type&#x3D;&quot;button&quot; value&#x3D;&quot;Refresh&quot; /&gt;
      &lt;h2&gt;Lines&lt;/h2&gt;
      &lt;div class&#x3D;&quot;edit-form-elem&quot;&gt;
        &lt;label for&#x3D;&quot;lines-text&quot;&gt;Text: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-text&quot;&gt;
          &lt;option value&#x3D;&quot;hide&quot;&gt;Hide&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot;&gt;Normal&lt;/option&gt;
          &lt;option value&#x3D;&quot;shorten&quot;&gt;Shorten&lt;/option&gt;
          &lt;option value&#x3D;&quot;wrap&quot; selected&#x3D;&quot;selected&quot;&gt;Wrap&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-maxreso&quot; title&#x3D;&quot;Max Resolution Denominator&quot;&gt;MaxReso.: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-maxreso&quot;&gt;
          &lt;option value&#x3D;&quot;38400&quot;&gt;38,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;19200&quot;&gt;19,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;9600&quot;&gt;9,600&lt;/option&gt;
          &lt;option value&#x3D;&quot;4800&quot;&gt;4,800&lt;/option&gt;
          &lt;option value&#x3D;&quot;2400&quot;&gt;2,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;1200&quot; selected&#x3D;&quot;selected&quot;&gt;1,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;600&quot;&gt;600&lt;/option&gt;
          &lt;option value&#x3D;&quot;300&quot;&gt;300&lt;/option&gt;
          &lt;option value&#x3D;&quot;150&quot;&gt;150&lt;/option&gt;
          &lt;option value&#x3D;&quot;75&quot;&gt;75&lt;/option&gt;
          &lt;option value&#x3D;&quot;32&quot;&gt;32&lt;/option&gt;
          &lt;option value&#x3D;&quot;16&quot;&gt;16&lt;/option&gt;
          &lt;option value&#x3D;&quot;8&quot;&gt;8&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-align&quot;&gt;Align: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-align&quot;&gt;
          &lt;option value&#x3D;&quot;&quot; selected&#x3D;&quot;selected&quot;&gt;&lt;/option&gt;
          &lt;option value&#x3D;&quot;center&quot;&gt;Center&lt;/option&gt;
          &lt;option value&#x3D;&quot;end&quot;&gt;End&lt;/option&gt;
          &lt;option value&#x3D;&quot;left&quot;&gt;Left&lt;/option&gt;
          &lt;option value&#x3D;&quot;right&quot;&gt;Right&lt;/option&gt;
          &lt;option value&#x3D;&quot;start&quot;&gt;Start&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-baseline&quot;&gt;Baseline: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-baseline&quot;&gt;
          &lt;option value&#x3D;&quot;alphabetic&quot;&gt;Alphabetic&lt;/option&gt;
          &lt;option value&#x3D;&quot;bottom&quot;&gt;Bottom&lt;/option&gt;
          &lt;option value&#x3D;&quot;hanging&quot;&gt;Hanging&lt;/option&gt;
          &lt;option value&#x3D;&quot;ideographic&quot;&gt;Ideographic&lt;/option&gt;
          &lt;option value&#x3D;&quot;middle&quot; selected&#x3D;&quot;selected&quot;&gt;Middle&lt;/option&gt;
          &lt;option value&#x3D;&quot;top&quot;&gt;Top&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-rotation&quot;&gt;Rotation: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-rotation&quot;&gt;
          &lt;option value&#x3D;&quot;0&quot;&gt;0°&lt;/option&gt;
          &lt;option value&#x3D;&quot;0.785398164&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;1.570796327&quot;&gt;90°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-font&quot;&gt;Font: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-font&quot;&gt;
          &lt;option value&#x3D;&quot;Arial&quot;&gt;Arial&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Courier New&#x27;&quot; selected&#x3D;&quot;selected&quot;&gt;Courier New&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Open Sans&#x27;&quot;&gt;Open Sans&lt;/option&gt;
          &lt;option value&#x3D;&quot;Verdana&quot;&gt;Verdana&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-weight&quot;&gt;Weight: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-weight&quot;&gt;
          &lt;option value&#x3D;&quot;bold&quot; selected&#x3D;&quot;selected&quot;&gt;Bold&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot;&gt;Normal&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-placement&quot;&gt;Placement: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-placement&quot;&gt;
          &lt;option value&#x3D;&quot;line&quot;&gt;Line&lt;/option&gt;
          &lt;option value&#x3D;&quot;point&quot; selected&#x3D;&quot;selected&quot;&gt;Point&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-maxangle&quot;&gt;Max Angle: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-maxangle&quot;&gt;
          &lt;option value&#x3D;&quot;0.7853981633974483&quot; selected&#x3D;&quot;selected&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;2.0943951023931953&quot;&gt;120°&lt;/option&gt;
          &lt;option value&#x3D;&quot;6.283185307179586&quot;&gt;360°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-overflow&quot;&gt;Exceed Len: &lt;/label&gt;
        &lt;select id&#x3D;&quot;lines-overflow&quot;&gt;
          &lt;option value&#x3D;&quot;true&quot;&gt;True&lt;/option&gt;
          &lt;option value&#x3D;&quot;false&quot; selected&#x3D;&quot;selected&quot;&gt;False&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-size&quot;&gt;Size: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;12px&quot; id&#x3D;&quot;lines-size&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-height&quot;&gt;Line height: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;1.2&quot; id&#x3D;&quot;lines-height&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-offset-x&quot;&gt;Offset X: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;lines-offset-x&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-offset-y&quot;&gt;Offset Y: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;lines-offset-y&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-color&quot;&gt;Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;green&quot; id&#x3D;&quot;lines-color&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-outline&quot; title&#x3D;&quot;Outline Color&quot;&gt;O. Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;#ffffff&quot; id&#x3D;&quot;lines-outline&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;lines-outline-width&quot; title&#x3D;&quot;Outline Width&quot;&gt;O. Width: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;3&quot; id&#x3D;&quot;lines-outline-width&quot; /&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class&#x3D;&quot;edit-form&quot;&gt;
      &lt;input id&#x3D;&quot;refresh-polygons&quot; type&#x3D;&quot;button&quot; value&#x3D;&quot;Refresh&quot; /&gt;
      &lt;h2&gt;Polygons&lt;/h2&gt;
      &lt;div class&#x3D;&quot;edit-form-elem&quot;&gt;
        &lt;label for&#x3D;&quot;polygons-text&quot;&gt;Text: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-text&quot;&gt;
          &lt;option value&#x3D;&quot;hide&quot;&gt;Hide&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot; selected&#x3D;&quot;selected&quot;&gt;Normal&lt;/option&gt;
          &lt;option value&#x3D;&quot;shorten&quot;&gt;Shorten&lt;/option&gt;
          &lt;option value&#x3D;&quot;wrap&quot;&gt;Wrap&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-maxreso&quot; title&#x3D;&quot;Max Resolution Denominator&quot;&gt;MaxReso.: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-maxreso&quot;&gt;
          &lt;option value&#x3D;&quot;38400&quot;&gt;38,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;19200&quot;&gt;19,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;9600&quot;&gt;9,600&lt;/option&gt;
          &lt;option value&#x3D;&quot;4800&quot;&gt;4,800&lt;/option&gt;
          &lt;option value&#x3D;&quot;2400&quot;&gt;2,400&lt;/option&gt;
          &lt;option value&#x3D;&quot;1200&quot; selected&#x3D;&quot;selected&quot;&gt;1,200&lt;/option&gt;
          &lt;option value&#x3D;&quot;600&quot;&gt;600&lt;/option&gt;
          &lt;option value&#x3D;&quot;300&quot;&gt;300&lt;/option&gt;
          &lt;option value&#x3D;&quot;150&quot;&gt;150&lt;/option&gt;
          &lt;option value&#x3D;&quot;75&quot;&gt;75&lt;/option&gt;
          &lt;option value&#x3D;&quot;32&quot;&gt;32&lt;/option&gt;
          &lt;option value&#x3D;&quot;16&quot;&gt;16&lt;/option&gt;
          &lt;option value&#x3D;&quot;8&quot;&gt;8&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-align&quot;&gt;Align: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-align&quot;&gt;
          &lt;option value&#x3D;&quot;&quot; selected&#x3D;&quot;selected&quot;&gt;&lt;/option&gt;
          &lt;option value&#x3D;&quot;center&quot;&gt;Center&lt;/option&gt;
          &lt;option value&#x3D;&quot;end&quot;&gt;End&lt;/option&gt;
          &lt;option value&#x3D;&quot;left&quot;&gt;Left&lt;/option&gt;
          &lt;option value&#x3D;&quot;right&quot;&gt;Right&lt;/option&gt;
          &lt;option value&#x3D;&quot;start&quot;&gt;Start&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-baseline&quot;&gt;Baseline: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-baseline&quot;&gt;
          &lt;option value&#x3D;&quot;alphabetic&quot;&gt;Alphabetic&lt;/option&gt;
          &lt;option value&#x3D;&quot;bottom&quot;&gt;Bottom&lt;/option&gt;
          &lt;option value&#x3D;&quot;hanging&quot;&gt;Hanging&lt;/option&gt;
          &lt;option value&#x3D;&quot;ideographic&quot;&gt;Ideographic&lt;/option&gt;
          &lt;option value&#x3D;&quot;middle&quot; selected&#x3D;&quot;selected&quot;&gt;Middle&lt;/option&gt;
          &lt;option value&#x3D;&quot;top&quot;&gt;Top&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-rotation&quot;&gt;Rotation: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-rotation&quot;&gt;
          &lt;option value&#x3D;&quot;0&quot;&gt;0°&lt;/option&gt;
          &lt;option value&#x3D;&quot;0.785398164&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;1.570796327&quot;&gt;90°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-font&quot;&gt;Font: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-font&quot;&gt;
          &lt;option value&#x3D;&quot;Arial&quot;&gt;Arial&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Courier New&#x27;&quot;&gt;Courier New&lt;/option&gt;
          &lt;option value&#x3D;&quot;&#x27;Open Sans&#x27;&quot;&gt;Open Sans&lt;/option&gt;
          &lt;option value&#x3D;&quot;Verdana&quot; selected&#x3D;&quot;selected&quot;&gt;Verdana&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-weight&quot;&gt;Weight: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-weight&quot;&gt;
          &lt;option value&#x3D;&quot;bold&quot; selected&#x3D;&quot;selected&quot;&gt;Bold&lt;/option&gt;
          &lt;option value&#x3D;&quot;normal&quot;&gt;Normal&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-placement&quot;&gt;Placement: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-placement&quot;&gt;
          &lt;option value&#x3D;&quot;line&quot;&gt;Line&lt;/option&gt;
          &lt;option value&#x3D;&quot;point&quot; selected&#x3D;&quot;selected&quot;&gt;Point&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-maxangle&quot;&gt;Max Angle: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-maxangle&quot;&gt;
          &lt;option value&#x3D;&quot;0.7853981633974483&quot; selected&#x3D;&quot;selected&quot;&gt;45°&lt;/option&gt;
          &lt;option value&#x3D;&quot;2.0943951023931953&quot;&gt;120°&lt;/option&gt;
          &lt;option value&#x3D;&quot;6.283185307179586&quot;&gt;360°&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-overflow&quot;&gt;Exceed Len: &lt;/label&gt;
        &lt;select id&#x3D;&quot;polygons-overflow&quot;&gt;
          &lt;option value&#x3D;&quot;true&quot;&gt;True&lt;/option&gt;
          &lt;option value&#x3D;&quot;false&quot; selected&#x3D;&quot;selected&quot;&gt;False&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-size&quot;&gt;Size: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;10px&quot; id&#x3D;&quot;polygons-size&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-height&quot;&gt;Line height: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;1&quot; id&#x3D;&quot;polygons-height&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-offset-x&quot;&gt;Offset X: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;polygons-offset-x&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-offset-y&quot;&gt;Offset Y: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;0&quot; id&#x3D;&quot;polygons-offset-y&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-color&quot;&gt;Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;blue&quot; id&#x3D;&quot;polygons-color&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-outline&quot; title&#x3D;&quot;Outline Color&quot;&gt;O. Color: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;#ffffff&quot; id&#x3D;&quot;polygons-outline&quot; /&gt;
        &lt;br /&gt;
        &lt;label for&#x3D;&quot;polygons-outline-width&quot; title&#x3D;&quot;Outline Width&quot;&gt;O. Width: &lt;/label&gt;
        &lt;input type&#x3D;&quot;text&quot; value&#x3D;&quot;3&quot; id&#x3D;&quot;polygons-outline-width&quot; /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;script src="main.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
      </div>

      <div class="row-fluid">
        <h5 class="source-heading">package.json</h5>
        <pre><code id="example-pkg-source" class="language-json">{
  &quot;name&quot;: &quot;vector-labels&quot;,
  &quot;dependencies&quot;: {
    &quot;ol&quot;: &quot;6.13.0&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;parcel&quot;: &quot;^2.0.0&quot;
  },
  &quot;scripts&quot;: {
    &quot;start&quot;: &quot;parcel index.html&quot;,
    &quot;build&quot;: &quot;parcel build --public-url . index.html&quot;
  }
}</code></pre>
      </div>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>
    <script src="./resources/prism/prism-1.20.0.min.js"></script>
    <script src="./resources/common.js"></script>
    <script src="common.js"></script>
        <script src="vector-labels.js"></script>
    <script>
      $('#tag-example-list').on('show.bs.modal', function (event) {
        const button = $(event.relatedTarget); // Button that triggered the modal
        const title = button.data('title');
        const content = button.data('content');
        const modal = $(this)
        modal.find('.modal-title').text(title);
        modal.find('.modal-body').html(content);
      });

      var packageUrl = 'https://raw.githubusercontent.com/openlayers/openlayers.github.io/build/package.json';
      fetch(packageUrl).then(function(response) {
        return response.json();
      }).then(function(json) {
        var latestVersion = json.version;
        document.getElementById('latest-version').innerHTML = latestVersion;
        var url = window.location.href;
        var branchSearch = url.match(/\/([^\/]*)\/examples\//);
        var cookieText = 'dismissed=-' + latestVersion + '-';
        var dismissed = document.cookie.indexOf(cookieText) != -1;
        if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && '6.13.0' != latestVersion) {
          var link = url.replace(branchSearch[0], '/latest/examples/');
          fetch(link, {method: 'head'}).then(function(response) {
            var a = document.getElementById('latest-link');
            a.href = response.status == 200 ? link : '../../latest/examples/';
          });
          var latestCheck = document.getElementById('latest-check');
          latestCheck.style.display = '';
          document.getElementById('latest-dismiss').onclick = function() {
            latestCheck.style.display = 'none';
            document.cookie = cookieText;
          }
        }
      });
    </script>
  </body>
</html>
